/**
 *
 */
package com.liangtian.mdm.system.icon.controller;

import com.alibaba.fastjson.JSONObject;
import com.liangtian.mdm.base.controller.BaseController;
import com.liangtian.mdm.util.RequestUtils;
import com.liangtian.mdm.system.icon.model.SysIcon;
import com.liangtian.mdm.system.icon.service.SysIconService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;


/**
 * @author Administrator
 *
 */
@Controller
@RequestMapping("/sysIcon")
public class SysIconController extends BaseController {

    @Autowired
    private SysIconService sysIconService;

    @SuppressWarnings("rawtypes")
    @RequestMapping(value = "/queryList", method = RequestMethod.POST)
    @ResponseBody
    public JSONObject queryList(HttpServletRequest request) {
        Map<String, Object> paramMap = RequestUtils.paramToMap(request);
        //获取当前用户
        List<SysIcon> list = sysIconService.queryIconListByCond(paramMap);
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("rows", list);// JSONArray
        return jsonObject;
    }

}
